<div class="tms-main-page-function">
    <div class="main-content">
        <div class="page-function">
            <ul class="wms-wbm-fun-left">
                <button class="layui-btn" ng-click="dealAbnomal()"
                        ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1">异常处理
                </button>
                <button class="layui-btn" ng-click="updateToClosed()"
                        ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1">异常关闭
                </button>
                <button class="layui-btn" ng-click="printAbm()">打印</button>
                <button class="layui-btn" ng-click="export()">导出</button>
                <a class="layui-btn" id="almExport" ng-href='{{excelUrl}}' ng-show="false"></a>
            </ul>
            <div class="wms-wbm-fun-right">
                <button class="layui-btn" ng-click="moreClick()">更多条件</button>
                <i class="iconfont icon-shuaxin layui-anim layui-anim-loop layui-anim-rotate wms-refresh"
                   ng-click="refreshClick()" refresh></i>
            </div>
        </div>

        <div class="otherForm" style="width: 96%; display:none">
            <ul>
                <li>
                    <div class="otherFormItem">
                        <div>订单号</div>
                        <div>
                            <input type="text" class="layui-input" ng-model="search.orderNo">
                        </div>
                    </div>
                    <div class="otherFormItem">
                        <div>异常分类</div>
                        <div>
                            <select ng-model="search.excpType" style="width:100%;height:32px">
                                <option value="">请选择</option>
                                <option value="10">入库异常</option>
                                <option value="20">出库异常</option>
                                <option value="30">备料异常</option>
                            </select>
                        </div>
                    </div>
                    <div class="otherFormItem">
                        <div>异常类型</div>
                        <div>
                            <select ng-model="search.excpTypeCode" style="width:100%;height:32px">
                                <option value="">请选择</option>
                                <option value="MISS">缺件异常</option>
                                <option value="EXCP">质损异常</option>
                                <option value="MISS_AND_EXCP">缺件，质损异常</option>
                                <option value="LOSS">非质损异常</option>
                                <option value="LOSS_AND_EXCP">质损，非质损异常</option>
                                <option value="LOSS_AND_MISS">缺件，非质损异常</option>
                                <option value="LOSS_EXCP_MISS">缺件，质损，非质损异常</option>
                            </select>
                        </div>
                    </div>
                    <div class="otherFormItem"
                         ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) != -1">
                        <div>验车人</div>
                        <div>
                            <input class="layui-input" ng-model="search.inspectUserName"/>
                        </div>
                    </div>
                    <div class="otherFormItem" ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1">
                        <div>异常状态</div>
                        <div>
                            <select ng-model="search.excpStatus" style="width:100%;height:32px">
                                <option value="">请选择</option>
                                <option value="10">未处理</option>
                                <option value="20">处理中</option>
                                <option value="30">已关闭</option>
                            </select>
                        </div>
                    </div>
                    <div class="otherFormItem" ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1">
                        <div>处理方式</div>
                        <div>
                            <select ng-model="search.dealType" style="width:100%;height:32px">
                                <option value="">请选择</option>
                                <option value="10">缺件跟进</option>
                                <option value="20">出库维修</option>
                                <option value="30">库内维修</option>
                                <option value="40">缺件跟进，出库维修</option>
                                <option value="50">缺件跟进，库内维修</option>
                            </select>
                        </div>
                    </div>
                </li>

                <li>
                    <div class="otherFormItem">
                        <div>车架号</div>
                        <div>
                            <input type="text" class="layui-input" ng-model="search.vin">
                        </div>
                    </div>
                    <div class="otherFormItem">
                        <div>异常发生时间</div>
                        <div>
                            <input type="text" lay-verify="date" placeholder="yyyy-mm-dd"
                                   ng-model="search.startGmtCreate" ng-click="Tools.modelAssignment($event,this)"
                                   autocomplete="off" class="layui-input"
                                   onclick="layui.laydate({elem: this,format:'YYYY-MM-DD',choose : angular.element(this).scope().Tools.modelAssignment,scope:angular.element(this).scope()})">
                        </div>
                    </div>
                    <div class="otherFormItem">
                        <div>至</div>
                        <div>
                            <input type="text" lay-verify="date" placeholder="yyyy-mm-dd" ng-model="search.endGmtCreate"
                                   ng-click="Tools.modelAssignment($event,this)" autocomplete="off" class="layui-input"
                                   onclick="layui.laydate({elem: this,format:'YYYY-MM-DD',choose : angular.element(this).scope().Tools.modelAssignment,scope:angular.element(this).scope()})">
                        </div>
                    </div>
                    <div class="otherFormItem" ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1">
                        <div>处理完成时间</div>
                        <div>
                            <input type="text" lay-verify="date" placeholder="yyyy-mm-dd"
                                   ng-model="search.startDealEndTime" ng-click="Tools.modelAssignment($event,this)"
                                   autocomplete="off" class="layui-input"
                                   onclick="layui.laydate({elem: this,format:'YYYY-MM-DD',choose : angular.element(this).scope().Tools.modelAssignment,scope:angular.element(this).scope()})">
                        </div>
                    </div>
                    <div class="otherFormItem" ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1">
                        <div>至</div>
                        <div>
                            <input type="text" lay-verify="date" placeholder="yyyy-mm-dd"
                                   ng-model="search.endDealEndTime" ng-click="Tools.modelAssignment($event,this)"
                                   autocomplete="off" class="layui-input"
                                   onclick="layui.laydate({elem: this,format:'YYYY-MM-DD',choose : angular.element(this).scope().Tools.modelAssignment,scope:angular.element(this).scope()})">
                        </div>
                    </div>
                </li>
                <li>
                    <div class="otherFormItem otherFormItemButton">
                        <button class="layui-btn" ng-click="getList()">查询</button>
                        <button class="layui-btn" ng-click="resetClick()">重置</button>
                    </div>
                </li>
            </ul>
        </div>

        <div class="layui-form scrollTable">
            <table class="layui-table wms_abm_table serial minScreen abmTable" style="width : 1920px;">
                <tbody>
                <tr>
                    <th class="noSelect left-1px disabled" style="width:24px !important;">
                        <input type="checkbox" name="" lay-skin="primary" lay-filter="allChoose"
                               style="position: relative;left: -1px;">
                    </th>
                    <th ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) != -1">订单号</th>
                    <th>车架号</th>
                    <th>异常分类</th>
                    <th>异常类型</th>
                    <th>异常状态</th>
                    <th>异常描述</th>
                    <th ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) != -1">验车人</th>
                    <th>责任方</th>
                    <th>异常图片</th>
                    <th>异常发生时间</th>
                    <th>处理方式</th>
                    <th>处理结果描述</th>
                    <th>处理完成时间</th>
                </tr>
                <tr ng-repeat="(key,item) in tableList" repeat-finish ng-click="Tools.initTableClick($event)"
                    key="{{key}}" excptype="{{item.excpType}}" orderid="{{item.orderId}}"
                    excpTimestamp="{{item.excpTimestamp}}">
                    <td>
                        <input type="checkbox" name="same" lay-skin="primary" lay-filter="test">
                    </td>
                    <td ng-bind="item.orderNo"
                        ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) == -1"></td>
                    <td ng-bind="item.vin"></td>
                    <td ng-bind="item.excpType | abnormal_excpType"></td>
                    <td ng-bind="item.excpTypeCode | abnormal_excpTypeCode"></td>
                    <td ng-bind="item.excpStatus | abnormal_excpStatus"></td>
                    <!--<td>{{item.excpDesc | abnormal_excpDesc}} <i class="layui-icon" style="color: #de531a" ng-click="">&#xe654;</i></td>-->
                    <td style="width: 180px">
                        <div class="abm_desc_div">
                            <!--<i class="layui-icon" style="font-size:12px;">&#xe61a;</i>&nbsp;&nbsp;{{item.excpDesc | abnormal_excpDesc}}-->
                            <i class="layui-icon abm_table_icon" ng-show="item.excpDesc|isHasIcon">&#xe61a;</i>
                            <i class="layui-icon abm_table_icon" ng-show="!(item.excpDesc | isHasIcon)"
                               style="opacity: 0">&#xe61a;</i>
                            &nbsp;&nbsp;
                            <span ng-bind-html="item.excpDesc | abnormal_excpDesc" style="float: left"></span>
                        </div>
                    </td>
                    <td ng-bind="item.inspectUserName"
                        ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) != -1"></td>
                    <td ng-bind="item.involvedParty"></td>
                    <td>
                        <span style="color: #de531a; text-decoration: underline" ng-click="getDetail($event)"
                              ng-show="item.excpDesc">查看</span>
                        <span ng-show="!item.excpDesc">无</span>
                    </td>
                    <td ng-bind="item.gmtCreate"></td>
                    <td ng-bind="item.dealType | abnormal_dealType"></td>
                    <td ng-bind="item.dealResultDesc"></td>
                    <td ng-bind="item.dealEndTime"></td>
                </tr>
                </tbody>
            </table>
        </div>
        <div class="admin-table-page" style="text-align: center;">
            <div id="pages" class="page">
            </div>
        </div>
    </div>
</div>